import Vue from 'vue'
import App from './App'
import store from './store/index.js'
import event from '@/common/event.js'
import socket from '@/common/websocket.js'

Vue.prototype.$store = store
Vue.prototype.$event = event
Vue.prototype.$socket = socket

String.prototype.toa = function(){
	alert(234)
}

Vue.config.productionTip = false

App.mpType = 'app'

// 引入全局uView
import uView from 'uview-ui'
Vue.use(uView);

const app = new Vue({
	...App,
	store,
})

// http拦截器
import httpInterceptor from '@/common/http.interceptor.js'
// 这里需要写在最后，是为了等Vue创建对象完成，引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app)

app.$mount()